import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class IconContainer extends StatelessWidget {
  IconData icon;
  Color bgColor;
  Color iconColor;
  double size = 20.0;
  double width = 20.0;
  double height = 20.0;

  IconContainer(this.icon,
      {this.bgColor, this.iconColor, this.size, this.width, this.height}) {
    bgColor = bgColor != null ? bgColor : Colors.white;
    iconColor = iconColor != null ? iconColor : Colors.blue;
    size = size != null ? size : 20.0;
    width = width != null ? width : size;
    height = height != null ? height : size;
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      width: width,
      height: height,
      color: this.bgColor,
      child: Icon(
        icon,
        color: iconColor,
        size: size,
      ),
    );
  }
}
